package com.xuni.neo4j.entity;

public enum PizzaDeliveryStrategy {
    EXPRESS {
        @Override
        public void deliver(String str) {
            System.out.println("Pizza will be delivered in express mode" + str);
        }

        public boolean handel(PizzaDeliveryStrategy pizzaDeliveryStrategy) {
            return pizzaDeliveryStrategy == NORMAL;
        }
    },
    NORMAL {
        @Override
        public void deliver(String str) {
            System.out.println("哈哈哈" + str);
        }

        public boolean handel(PizzaDeliveryStrategy pizzaDeliveryStrategy) {
            return pizzaDeliveryStrategy == EXPRESS;
        }
    };

    // 策略方法
    public abstract void deliver(String str);

    // 策略是否处理
    public abstract boolean handel(PizzaDeliveryStrategy pizzaDeliveryStrategy);
}